package service.impl;

import dao.PhoneDao;
import dao.impl.PhoneDaoImpl;
import model.Phone;
import service.PhoneService;

import java.util.List;

/**
 * @Description:
 * @Author one world
 * @Date 2020/9/23 0023 12:51
 */
public class PhoneServiceImpl implements PhoneService {
    PhoneDao dao = new PhoneDaoImpl();
    @Override
    public List<Phone> findAll() {
        return dao.findAll();
    }

    @Override
    public Phone findById(int id) {
        return dao.findByPK(id);
    }

    @Override
    public boolean add(Phone phone) {
        return dao.add(phone);
    }

    @Override
    public boolean del(int id) {
        return dao.delByPK(id);
    }

    @Override
    public boolean update(Phone phone) {
        return dao.update(phone);
    }
}
